package com.dbsync.core;

import java.util.Date;
import java.util.List;

/**
 * 任务类
 */
public class Target extends Base{
    // 任务执行时间
    private Date time;
    // 同步表名集合
    private List<String> tables;
    // 是否同步视图
    private Boolean syncViews;
    // 是否同步视过程或函数
    private Boolean syncProc;
    // 任务执行时间间隔
    private Long period;
    // 错误是否继续
    private Boolean errorContinue;

    public Target(String url, String username, String password, String driverClassName, List<String> tables, Boolean syncViews, Boolean syncProc, Date time, Long period, Boolean errorContinue) {
        this.url = url;
        this.username = username;
        this.password = password;
        this.driverClassName = driverClassName;
        this.tables = tables;
        this.syncViews = syncViews;
        this.syncProc = syncProc;
        this.time = time;
        this.period = period;
        this.errorContinue = errorContinue;
    }

    public void setTables(List<String> tables) {
        this.tables = tables;
    }

    public List<String> getTables() {
        return tables;
    }

    public Boolean getSyncViews() {
        return syncViews;
    }

    public void setSyncViews(Boolean syncViews) {
        this.syncViews = syncViews;
    }

    public Boolean getSyncProc() {
        return syncProc;
    }

    public void setSyncProc(Boolean syncProc) {
        this.syncProc = syncProc;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Long getPeriod() {
        return period;
    }

    public void setPeriod(Long period) {
        this.period = period;
    }

    public Boolean getErrorContinue() {
        return errorContinue;
    }

    public void setErrorContinue(Boolean errorContinue) {
        this.errorContinue = errorContinue;
    }
}
